import { createStore,applyMiddleware,combineReducers } from 'redux'
import reduxThunk from 'redux-thunk'
import reduxPromsie from 'redux-promise'
// 引入状态数据模块
import isCollapseReducer from './reducers/isCollapseReducer'
import rightListReducer from './reducers/rightListReducer'
import roleListReducer from './reducers/roleListReducer'

const reducer = combineReducers({
  isCollapsed:isCollapseReducer, //管理侧边栏是否隐藏和显示
  rightList:rightListReducer, //缓存right里面的列表
  roleList:roleListReducer //缓存role里面的列表
})

const store = createStore(reducer,applyMiddleware(reduxThunk,reduxPromsie))

export default store